<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="edu.ucsur.tp.negocio.mantenimientos.*" %>
<%@ page import="edu.ucsur.tp.beans.*" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.*" %>
<%@ page import="java.text.*" %>


<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>ContactCenter - Padisoft</title>

    <!-- Bootstrap Core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="css/estilos.css" rel="stylesheet">
    
    <!-- jQuery -->
    <script src="js/jquery.js"></script>
    <script src="js/jquery-1.11.1.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="js/bootstrap.min.js"></script>

</head>

<body>
	
	<%@include file="app_code/session.jsp" %>
	
	<jsp:include page="app_code/cabecera.jsp"/>
	
    <!-- Page Content -->
    <div class="container">

        <div class="row">
			
            <jsp:include page="app_code/menu.jsp"/>

            <div class="col-md-9">
				
				<div class="caption-full">
				  <div class="row">
				    <div class="col-md-6"><h4>.:: Registro de Clientes ::.</h4></div><div class="col-md-6">
				  </div>
					</div>
					
					<%
						
						String action = request.getParameter("action");
						ClienteBean oCli = (ClienteBean)request.getAttribute("cliente");
						String fecha_nac = "";
						
						if (action.equals("edit")){
							DateFormat df = DateFormat.getDateInstance();
							fecha_nac = df.format(oCli.getFechanac());	
						}
										
					%>
					
					<div class="well">
					<form class="form-horizontal" action="ClientesServlet" role="form" method="POST">
					   	
					   	<div class="form-group"> 
						   	  <label for="txtId" class="col-sm-2 control-label">Id Cliente</label>
						      <div class="col-sm-10">
						      <input type="text" class="form-control" id="txtId" name="txtId" readonly="readonly" value="<%= oCli.getId_cliente() %>"
						         placeholder="Ingrese Apellido">
						      </div>
					   	</div>
					   	
					   	<div class="form-group"> 
						   	  <label for="txtApellidos" class="col-sm-2 control-label">Apellidos</label>
						      <div class="col-sm-10">
						      <input type="text" class="form-control" id="txtApellidos" name="txtApellidos" value="<%= oCli.getApellidos() %>"
						         placeholder="Ingrese Apellido">
						      </div>
					   	</div>
					   	 
					   	 <div class="form-group"> 
						   	<label for="txtNombres" class="col-sm-2 control-label">Nombres</label>
						    <div class="col-sm-10">
						      <input type="text" class="form-control" id="txtNombres" name="txtNombres" value="<%= oCli.getNombres() %>"
						         placeholder="Ingrese Nombres">
						    </div>     
					   	 </div> 
					   	 
					   	 <div class="form-group"> 
						   	<label for="txtDocumento" class="col-sm-2 control-label">Nro Documento</label>
						    <div class="col-sm-10">
						      <input type="text" class="form-control" id="txtDocumento" name="txtDocumento" value="<%= oCli.getNrodoc() %>"
						         placeholder="Ingrese Nro Documento">
						    </div>     
					   	 </div>
					   	 
					   	 <div class="form-group"> 
						   	<label for="txtCorreo" class="col-sm-2 control-label">Correo</label>
						    <div class="col-sm-10">
						      <input type="text" class="form-control" id="txtCorreo" name="txtCorreo" value="<%= oCli.getCorreo() %>"
						         placeholder="Ingrese Correo">
						    </div>     
					   	 </div>
					   	 
					   	 <div class="form-group"> 
						   	<label for="txtTelefono1" class="col-sm-2 control-label">Telefono 1</label>
						    <div class="col-sm-10">
						      <input type="text" class="form-control" id="txtTelefono1" name="txtTelefono1" value="<%= oCli.getTelefono1() %>"
						         placeholder="Ingrese Nro Telefono 1">
						    </div>     
					   	 </div>
					     
					     <div class="form-group"> 
						   	<label for="txtFechaNac" class="col-sm-2 control-label">Fecha Nac.</label>
						    <div class="col-sm-10">
						      <input type="text" class="form-control" id="txtFechaNac" name="txtFechaNac" value="<%= fecha_nac %>"
						         placeholder="Ingrese Fecha Nac.">
						    </div>     
					   	 </div>
					     
					     <input type="hidden" name="action" value="<%= action %>">
					          
					     <div class="text-right">
					     	<a href="clientes_lista.jsp" class="btn btn-success">Volver</a>
                        	<button type="submit" class="btn btn-success">Guardar</button>
                       	 </div> 
					   
					</form>
                    
	            </div>
	       		</div>
			</div>
        </div>

    </div>
    
    <jsp:include page="app_code/pie.jsp" />

    

</body>

</html>
